//
//  ButtonViewController.m
//  数码时代App
//
//  Created by dlios on 15-1-7.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ButtonViewController.h"
#import "ConnectModel.h"
#import "FourButtonModel.h"
@interface ButtonViewController ()

@end

@implementation ButtonViewController
-(void)dealloc
{
    [super dealloc];
}
-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view setBackgroundColor:[UIColor whiteColor]];
    [self WebView];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)WebView
{
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width, self.view.frame.size.height - 113)];
    [self.view addSubview:web];
    if (_flag == 5) {
//        车展摄影
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51993256?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
        [web setScalesPageToFit:YES];
    }
    if (_flag == 0) {
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51995224?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
        [web setScalesPageToFit:YES];
    }else if (_flag == 1)
    {
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51996645?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
        [web setScalesPageToFit:YES];
    }else if (_flag == 2)
    {
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51997604?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
    }else if(_flag == 4)
    {
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51994565?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
    }else if (_flag == 3)
    {
        NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://mrobot.pconline.com.cn/v2/itbbs/topics/51996311?pageNo=1&picRule=2&authorId=0&topicTemplate=3.6.0&app=pconlinebrowser&appVersion=3.10.0&size=18"]];
        [web loadRequest:request];
    }
}
-(void)getButton:(NSInteger)ButtonFlag
{
    self.flag = ButtonFlag;
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
